package com.anolesoft.amljmes.fortysix.service.impl;

import com.anolesoft.amljmes.fortysix.dto.*;
import com.anolesoft.amljmes.fortysix.service.info.MesBzzZcbldmxService;
import com.anolesoft.amljmes.fortysix.service.mapper.MesBzzZcbldmxServiceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class MesBzzZcbldmxServiceImpl implements MesBzzZcbldmxService {
    @Autowired
    MesBzzZcbldmxServiceMapper mesBzzZcbldmxServiceMapper;


    @Override
    public int addMesBzzZcbldmx(MesBzzZcbldmxDto inFoDtoParam) {
        int count = mesBzzZcbldmxServiceMapper.addMesBzzZcbldmx(inFoDtoParam);
        return count;
    }

    @Override
    public List<MesBzzBindDto> queryBindYjd(String yijiaodanhao) {
        return mesBzzZcbldmxServiceMapper.queryBindYjd(yijiaodanhao);
    }

    @Override
    public List<MesBzzBindDto> queryBindBjd(String bujiandanhao) {
        return mesBzzZcbldmxServiceMapper.queryBindBjd(bujiandanhao);
    }

    @Override
    public List<MesBzzZcbldmxDto> queryZcbldmx(String bldobjuid) {
        System.out.println(bldobjuid+"----------------------");
        return mesBzzZcbldmxServiceMapper.queryZcbldmx(bldobjuid);
    }

    @Override
    public int updateStateZx(List<String> qualifiedLabelNumbers) {
        int count = 0;
        for(String qualifiedLabelNumber : qualifiedLabelNumbers) {
            count += mesBzzZcbldmxServiceMapper.updateStateZx(qualifiedLabelNumber);
        }
        return count;
    }

    @Override
    public int updateNumJs(List<BudengyuDto> bdy) {
        int count = 0;
        for(BudengyuDto dto : bdy) {
            count += mesBzzZcbldmxServiceMapper.updateNumJs(dto);
        }
        return count;
    }

    @Override
    public int updateZcbldBz(newDto dto) {
        return mesBzzZcbldmxServiceMapper.updateZcbldBz(dto);
    }

    @Override
    public List<YjBjDto> queryBindYjBjd(String objuid) {
        return  mesBzzZcbldmxServiceMapper.queryBindYjBjd(objuid);
    }
}
